import {baseEffects, baseReducers, baseState} from "../../../../models/baseModel";
import {getLabel} from "assets/const/city";

export default {
  namespace: 'hospitalDetail',

  state: {
    ...baseState,
    hospitalInfo: {},
    uploadStatistics: [],
  },

  reducers: {
    ...baseReducers
  },

  effects: {

    ...baseEffects,

    * getHospitalInfo({payload}, {put}) {

      const {hospitalId} = payload;

      const hospitalInfo = {
        id: hospitalId,
        name: '宁波第' + hospitalId + '医院',
        area: '东区',
        city: getLabel("110100"),
        contact: '张三',
        address: '上海市',
        deviceSize: 12,
      };

      yield put({
        type: 'initState',
        payload: {hospitalInfo}
      });
    },

  }

}

function getBaseUrl() {
  return "/device/bp/";
}

